library(shiny)
## Warning: パッケージ 'shiny' はバージョン 4.4.3 の R の下で造られました
library(shinyjs)
## Warning: パッケージ 'shinyjs' はバージョン 4.4.3 の R の下で造られました
##
## 次のパッケージを付け加えます: 'shinyjs'
## 以下のオブジェクトは 'package:shiny' からマスクされています:
##
## runExample
## 以下のオブジェクトは 'package:methods' からマスクされています:
##
## removeClass, show
shinyUI(fluidPage(
titlePanel("Single-cell RNA-seq Viewer with Seurat"),
sidebarLayout(
sidebarPanel(width = 3,
fileInput("zipfile", "Upload 10X folder (as zip file)", accept = ".zip"),
useShinyjs(),
actionButton("run_initial_processing", "Quality check"),
helpText("データの読み込みとQuality Check用のplotを生成します"),
hr(),
h4("Quality Check Parameters"),
numericInput("min_features", "Min Features (nFeature_RNA)", value = 30, min = 0),
numericInput("max_features", "Max Features (nFeature_RNA)", value = 5000, min = 1),
numericInput("max_mt_percent", "Max Mitocondrial gene %", value = 5, min = 0, max = 100),
numericInput("dims_pca", "Number of PCA dimensions (FindNeighbors/RunUMAP)",
value = 10, min = 1),
numericInput("resolution", "Resolution for clustering (FindClusters)",
value = 0.5, min = 0.1, step = 0.1),
helpText("Resolutinが大きいほどClusterが細かくなります"),
actionButton("run", "Run Seurat Analysis"),
helpText("上のパロメータを設定してから計算始めてください"),
hr(),
numericInput("dotsize", "Dot size for UMAP",
value = 0.5, min = 0.1, step = 0.1),
hr(),
uiOutput("gene_selector"),
hr(),
actionButton("calc_marker", "Calculate Marker Genes"),
helpText("少し時間がかかります お茶くみに行くなら今のうちです")
),
mainPanel(
tabsetPanel(
id = "main_tabs",
tabPanel("Plots",
h4("Quality Check Plots"),
fluidRow(
column(6, plotOutput("qc_plot_mt", height = "400px"))
),
hr(),
h4("UMAP (Cluster)"),
fluidRow(
column(6,
actionButton("preview_download_UMAP", "Preview & Download PNG"), # UMAPのボタンは変更済み
plotOutput("umapPlot", height = "450px", width = "500px")),
column(6,
actionButton("preview_download_feature", "Preview & Download PNG"), # FeaturePlotのボタンを変更
plotOutput("featurePlot", height = "450px", width = "500px"))
),
hr(),
h4("Gene Expression Visualizations"),
fluidRow(
column(9,
actionButton("preview_download_vlnplot", "Preview & Download PNG"), # VlnPlotのボタンを変更
plotOutput("vlnPlot", height = "400px", width = "800px"))
),
fluidRow(
column(3,
actionButton("preview_download_dotplot", "Preview & Download PNG"), # DotPlotのボタンを変更
plotOutput("dotPlot", height = "450px", width = "350px"))
),
),
tabPanel("DEG Table",
h4("Marker Genes for Each Cluster"),
downloadButton("download_marker", "Download CSV"),
DT::dataTableOutput("marker_table")
),
tabPanel("Heatmap",
h4("Heatmap of each cluster marker"),
numericInput("top_n_genes", "Top N marker genes per cluster", value = 5, min = 1),
actionButton("draw_heatmap", "Generate Heatmap"),
br(), br(),
downloadButton("download_heatmap", "Download PNG"),
plotOutput("heatmapPlot", height = "800px")
)
)
)
)
))
Single-cell RNA-seq Viewer with Seurat
Quality Check Plots
UMAP (Cluster)
Gene Expression Visualizations